<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--bootstrap插件-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/static/plugin/bootstrap/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/plugin/jo/joUI.css" rel="stylesheet"/>
    <!--字体插件-->
    <link href="/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/static/plugin/layui-2.4.3/css/layui.css" rel="stylesheet"/>
    <!--ztree-->
    <link href="/static/plugin/zTree/css/metroStyle/metroStyle.css" rel="stylesheet"/>
    <!--common-->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <title>农用地风险管控表表单</title>
</head>
<body>
<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
    <ul class="layui-tab-title">
        <li class="layui-this">农用地风险管控</li>
    </ul>
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <!--按钮栏-->
            <div class="form-group button-bar button-bar">
                <!--按钮占位符.加载到的按钮会渲染到占位符里面-->
                <span class="young-button-placeholder" navigateId="PLAN_NYDFX_FORM_BUTTON"></span>
            </div>
            <!--按钮栏-->
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <form id="pageForm" name="pageForm" action="" method="post">
                <h3 style="margin-bottom: 10px">农用地风险管控：</h3><h6>注：<span style="color: red">*</span>为必填项</h6>
                <table class="table-bordered layui-table">
                    <colgroup>
                        <col width="150">
                        <col width="500">
                        <col width="150">
                    </colgroup>
                    <tbody>
                    <tr id="pro">
                        <th class="styleright"><span style="color: red">*</span>行政区划</th>
                        <td class="stylecenter">
                            <div class="form-group" style="float: left">
                                <label class="control-label" style="float: left;margin-top: 15px">省：&nbsp;</label>
                                <select style="width: 120px;margin-top: 10px" name="province" id="provinceCode"
                                        class="joSelect form-control" data=''
                                        firstItem='{"id":"","name":""}'
                                        dataurl="" keyfield="id" valuefield="name">
                                </select>
                            </div>
                            <div class="form-group" style="float: left">
                                <label class="control-label" style="float: left;margin-top: 15px;margin-left: 8px">市：&nbsp;</label>
                                <select style="width: 120px;margin-top: 10px" name="city" id="cityCode"
                                        class="joSelect form-control"
                                        data=''
                                        firstItem='{"id":"","name":""}' dataurl="" keyfield="id" valuefield="name">
                                </select>
                            </div>
                            <div class="form-group" style="float: left">
                                <label class="control-label" style="float: left;margin-top: 15px;margin-left: 8px">县：&nbsp;</label>
                                <select style="width: 120px;margin-top: 10px" name="county" id="countyCode"
                                        class="joSelect form-control"
                                        data=''
                                        firstItem='{"id":"","name":""}' dataurl="" keyfield="id" valuefield="name">
                                </select>
                            </div>
                        </td>
                    </tr>
                    <tr id="lan">
                        <th class="styleright"><span style="color: red">*</span>地块名称</th>
                        <td class="stylecenter">
                            <select name="agricultId" id="organizationcode" class="joSelect form-control"
                                    ErrEmpty="地块名称不允许为空"
                                    data=''
                                    firstItem='{"id":"","landname":""}' dataurl="" keyfield="id"
                                    valuefield="landname">
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>编制单位</th>
                        <td class="stylecenter">
                            <input type="text" name="organizationunit" value="" class="form-control "
                                   ErrEmpty="编制单位不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>编制时间</th>
                        <td class="stylecenter">
                            <input type="text" id="organizationtime" value="" name="organizationtime"
                                   class="form-control "
                                   ErrEmpty="编制时间不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>统一社会信用代码</th>
                        <td class="stylecenter">
                            <input type="text" name="creditcode" value="" class="form-control "
                                   ErrEmpty="统一社会信用代码不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright">地块面积</th>
                        <td class="stylecenter">
                            <input type="text" name="landarea" value="" class="form-control "/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>主要风险管控措施</th>
                        <td class="stylecenter">
                            <input type="text" name="measure" value="" class="form-control " ErrEmpty="主要风险管控措施不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>是否通过专家论证</th>
                        <td class="stylecenter">
                            <select name="isdemonstration" value="" class="form-control" ErrEmpty="是否通过专家论证不允许为空">
                                <option value="0">否</option>
                                <option value="1">是</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>实施开始时间</th>
                        <td class="stylecenter">
                            <input type="text" id="starttime" value="" name="starttime" class="form-control "
                                   ErrEmpty="实施开始时间不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>实施结束时间</th>
                        <td class="stylecenter">
                            <input type="text" id="endtime" value="" name="endtime" class="form-control "
                                   ErrEmpty="实施结束时间不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright"><span style="color: red">*</span>实施效果评估</th>
                        <td class="stylecenter">
                            <input type="text" name="assessment" value="" class="form-control " ErrEmpty="实施效果评估不允许为空"/>
                        </td>
                    </tr>
                    <tr>
                        <th class="styleright">备注</th>
                        <td class="stylecenter">
                            <input type="text" name="remarks" value="" class="form-control "/>
                        </td>
                    </tr>
                    <tr style="display: none">
                        <th class="styleright"><span style="color: red">*</span>锁定</th>
                        <td class="stylecenter">
                            <select name="unlack" value="0" class="form-control" ErrEmpty="锁定不允许为空">
                                <option value="0">未锁定</option>
                                <option value="1">已锁定</option>
                            </select>
                        </td>
                    </tr>
                    </tbody>
                </table>
                <!--<div class="young-form-item col-md-6 must">
                    <div class="young-form-label">主键ID</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="id" value="" class="form-control readonly-edit"  ErrNumber="主键ID需填写数字类型" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">序号</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="serialnumber" value="" class="form-control "   />
                    </div>
                </div>-->

                <!--<div class="young-form-item col-md-6 must" id="pro">
                    <div class="young-form-label">省</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="province" id="provinceCode" class="joSelect form-control" data=''
                                firstItem='{"id":"","name":""}'
                                dataurl="" keyfield="id" valuefield="name"></select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must" id="cit">
                    <div class="young-form-label">市</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="city" id="cityCode" class="joSelect form-control" data=''
                                firstItem='{"id":"","name":""}' dataurl="" keyfield="id" valuefield="name"></select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must" id="cou">
                    <div class="young-form-label">县</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="county" id="countyCode" class="joSelect form-control" data=''
                                firstItem='{"id":"","name":""}' dataurl="" keyfield="id" valuefield="name"></select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must" id="lan">
                    <div class="young-form-label">地块名称</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="landname" id="organizationcode" class="joSelect form-control" ErrEmpty="地块名称不允许为空"
                                data=''
                                firstItem='{"id":"","landname":""}' dataurl="" keyfield="landname"
                                valuefield="landname">
                        </select>
                    </div>
                </div>

                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">编制单位</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="organizationunit" value="" class="form-control " ErrEmpty="编制单位不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">编制时间</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="organizationtime" value="" name="organizationtime" class="form-control "
                               ErrEmpty="编制时间不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">统一社会信用代码</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="creditcode" value="" class="form-control " ErrEmpty="统一社会信用代码不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">地块面积</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="landarea" value="" class="form-control "/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">主要风险管控措施</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="measure" value="" class="form-control " ErrEmpty="主要风险管控措施不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">是否通过专家论证</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="isdemonstration" value="" class="form-control" ErrEmpty="是否通过专家论证不允许为空">
                            <option value="0">否</option>
                            <option value="1">是</option>
                        </select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">实施开始时间</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="starttime" value="" name="starttime" class="form-control "
                               ErrEmpty="实施开始时间不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">实施结束时间</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="endtime" value="" name="endtime" class="form-control "
                               ErrEmpty="实施结束时间不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">实施效果评估</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="assessment" value="" class="form-control " ErrEmpty="实施效果评估不允许为空"/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">备注</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="remarks" value="" class="form-control "/>
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">锁定</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="unlack" value="" class="form-control" ErrEmpty="锁定不允许为空">
                            <option value="0">未锁定</option>
                            <option value="1">已锁定</option>
                        </select>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">附件</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" name="enclosure" value="" class="form-control "/>
                        <input type="button" value="预览" onclick="lookFJ"/>
                    </div>
                </div>-->
            </form>
        </div>
    </div>
</div>

<!--配置信息-->
<script src="/static/js/config.js"></script>
<!--jquery-->
<script src="/static/plugin/jquery/jquery-3.3.1.js"></script>
<script src="/static/plugin/jquery/jquery.cookie.js"></script>
<!--bootstrap-->
<script src="/static/plugin/bootstrap/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="/static/plugin/other/html5shiv.js"></script>
<script src="/static/plugin/other/respond.min.js"></script>
<![endif]-->
<!--layui-->
<script src="/static/plugin/layui-2.4.3/layui.all.js"></script>
<!--ztree-->
<script src="/static/plugin/zTree/js/jquery.ztree.all.js"></script>
<!--common-->
<script src="/static/js/common.js"></script>
<!--jo-->
<script src="/static/plugin/jo/jo.js"></script>
<script src="/static/plugin/jo/jo-adapt.js"></script>
<script src="/static/plugin/jo/jo-page-view.js"></script>
<script src="/static/plugin/jo/jo-page-form.js"></script>
<script src="/static/plugin/jo/jo-listener.js"></script>
<script type="text/javascript">
    layui.laydate.render({
        elem: '#organizationtime' //注册日期控件
    });
    layui.laydate.render({
        elem: '#starttime' //注册日期控件
    });
    layui.laydate.render({
        elem: '#endtime' //注册日期控件
    });
    $(function () {
        var jParams = {
            "PKName": "id",//主键属性名
            "saveAfter": "toEdit",
            "addUrl": "/nyd/uviFarmlandcontrol/insert",//新增
            "deleteUrl": "/nyd/uviFarmlandcontrol/delete",//删除
            "updateUrl": "/nyd/uviFarmlandcontrol/update",//修改
            "formDataUrl": "/nyd/uviFarmlandcontrol/get",//查询
            //"readonly2Label" : true //只读转文本
        };
        joForm.initFormPage(jParams);//初始化
        initButton();
    });
    //初始化新增页面回调函数(在初始化按钮前发生)
    joForm.initFormPageOfAdd = function () {
        //初始化省市县联动
        initProvinceCityCounty('provinceCode', 'cityCode', 'countyCode');
    };
    //初始化表单值前处理
    joForm.initFormValueBefore = function (oJson) {
        oJson.organizationtime = jo.formatDate(oJson.organizationtime);
        oJson.starttime = jo.formatDate(oJson.starttime);
        oJson.endtime = jo.formatDate(oJson.endtime);

        if (joForm.isAdd) {
            //初始化省市县联动
            initProvinceCityCounty('provinceCode', 'cityCode', 'countyCode', joForm.formData.province, joForm.formData.city, joForm.formData.county);
        } else {
            $("#pro").hide();
            $("#cit").hide();
            $("#cou").hide();
            $("#lan").hide();
        }

    };
    //初始化表单值后处理
    joForm.initFormValueAfter = function (oJson) {

    };
    //新增请求提交前回调函数
    joForm.dealDataAtSaveBefore = function (oJson) {

    };
    //修改请求提交前回调函数
    joForm.dealDataAtUpdateBefore = function (oJson) {

    };
    /* 关于joForm更多回调函数和配置参数可查看jo-page-form.js */
</script>
</body>
</html>
